<template>
  <div>
    <table border="1">
      <tr>
        <td>用户名</td>
        <td>手机号</td>
        <td>订购产品图片</td>
      </tr>
      <tr v-for="i in dinglist">
        <td>{{i.name}}</td>
        <td>{{i.shouji}}</td>
        <td><img :src="'http://127.0.0.1:8000/'+ i.text" alt=""></td>
      </tr>
    </table>
  </div>
</template>

<script>
    export default {
        name: "dingdan",
      data:function () {
        return{
          dinglist:[],
          name:''
        }
      },
      mounted() {
          let name = localStorage.getItem('name');

          this.axios({
            url:'http://127.0.0.1:8000/dan/',
            method:'get',
            params:{name:name}
          }).then(res=>{
            if(res.data.code==200){
              this.dinglist = res.data.message
              console.log(this.dinglist)
            }
          })
      }
    }
</script>

<style scoped>

</style>
